package com.whmskj.xjlhbc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whmskj.xjlhbc.domain.PasswordAuth;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PasswordAuthMapper extends BaseMapper<PasswordAuth> {

    @Select("select a.userId from jit_user a left join password_auth b on a.userid=b.userid where a.nick = (select nick  from jit_user where userId=#{userId} limit 1) order by a.createTime desc limit 1")
    String getNewUserId(String userId);
}
